function xnstCOMFn = nstCOMFn(x)
xnstCOMFn = ((-1903*sin(x(1)))/5000 - (2261*sin(x(1) + x(2)))/5000 +  ...
  (2261*sin(x(1) + x(2) + x(3) - x(4)))/5000 +  ...
  (12759122123*sin(x(1)) + 14065902578*sin(x(1) + x(2)) +  ...
    3492465000*sin(x(1) + x(2) + x(3)) -  ...
    1637194622*sin(x(1) + x(2) + x(3) - x(4)) -  ...
    457593477*sin(x(1) + x(2) + x(3) - x(4) - x(5)))/34726000000 +  ...
  (1903*sin(x(1) + x(2) + x(3) - x(4) - x(5)))/5000)/ ...
 ((1903*cos(x(1)))/5000 + (2261*cos(x(1) + x(2)))/5000 -  ...
  (2261*cos(x(1) + x(2) + x(3) - x(4)))/5000 -  ...
  (1903*cos(x(1) + x(2) + x(3) - x(4) - x(5)))/5000 +  ...
  (-12759122123*cos(x(1)) - 14065902578*cos(x(1) + x(2)) -  ...
    3492465000*cos(x(1) + x(2) + x(3)) +  ...
    1637194622*cos(x(1) + x(2) + x(3) - x(4)) +  ...
    457593477*cos(x(1) + x(2) + x(3) - x(4) - x(5)))/34726000000) ...
;